﻿using System;
using System.Collections.Generic;

namespace NetTopologySuite.CoordinateSystems
{
	public class LinkedCRS : CRSBase
	{
		public LinkedCRS(string href, string type = "") : this(new Uri(href), type)
		{
		}

		public LinkedCRS(Uri href, string type = "")
		{
			if (href == null)
			{
				throw new System.ArgumentNullException("href");
			}
			base.Properties = new Dictionary<string, object>
			{
				{
					"href",
					href.ToString()
				}
			};
			if (!string.IsNullOrEmpty(type))
			{
				base.Properties.Add("type", type);
			}
			base.Type = CRSTypes.Link;
		}
	}
}
